<template>
  <div class="hot">
    <h2>今日热门</h2>
    <ul>
      <li v-if="item.is_hot" v-for="(item, i) in hotlist" :key="i" >{{ item.title }}</li>
    </ul>
  </div>
</template>

<script>
import { getHotArticle } from "../../api/Recommend";
export default {
  data() {
    return {
      hotlist: [],
    };
  },
  mounted() {
    getHotArticle().then((res) => {
      this.hotlist = res.data;
      console.log(this.hotlist,'asdasdasd')
    });
  },
};
</script>

<style scoped>
.hot {
  background-color: #ffffff;
  margin-bottom: 0.2rem;
  padding: 0.3rem 0.18rem;
}
h2 {
  font-size: 0.3rem;
  line-height: 0.46rem;
}
li {
  font-size: 0.28rem;
  line-height: 0.56rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  list-style-type: disc;
  list-style-position: inside;
}
</style>
